package com.ukao.cashregister.ui.setting;


import android.os.Bundle;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.ukao.cashregister.R;
import com.ukao.cashregister.base.BaseFragment;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import butterknife.Unbinder;

/**
 * 扫码枪
 */
public class ParameterFragment extends BaseFragment {

    private static final String ARG_PARAM1 = "param1";
    private static final String ARG_PARAM2 = "param2";

    Unbinder unbinder;
    @BindView(R.id.quit)
    TextView quit;
    @BindView(R.id.care_label)
    TextView careLabel;


    private String mParam1;
    private String mParam2;


    public static ParameterFragment newInstance(String param1, String param2) {
        ParameterFragment fragment = new ParameterFragment();
        Bundle args = new Bundle();
        args.putString(ARG_PARAM1, param1);
        args.putString(ARG_PARAM2, param2);
        fragment.setArguments(args);
        return fragment;
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        if (getArguments() != null) {
            mParam1 = getArguments().getString(ARG_PARAM1);
            mParam2 = getArguments().getString(ARG_PARAM2);
        }
    }


    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {

        View view = inflater.inflate(R.layout.fragment_parameter_setting, container, false);
        unbinder = ButterKnife.bind(this, view);
        initView();
        initListener();
        return view;
    }

    @Override
    protected void initView() {
        quit.setText("");
//        initLinearRecyclerView(recyclerView);
//        mSettingSpearAdapter = new SettingSpearAdapter(activity, mData);
//        recyclerView.setAdapter(mSettingSpearAdapter);
    }


    @Override
    public void onDestroyView() {
        super.onDestroyView();
        unbinder.unbind();
    }

    @OnClick({R.id.quit, R.id.care_label})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.quit:
                break;
            case R.id.care_label:
                start(CareLabelFragment.newInstance("",""));
                break;
        }
    }
}
